package com.woniu.darryringmall.front.HandlerInterceptor;

/*
 * @Author XW
 * @Description
 * 把过滤器注册到适配器中
 * @Date 日期：2021/8/17  时间：16:14
 **/

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor()).addPathPatterns("/**");
    }
}
